import { createApp } from 'vue'
import App from './App.vue'
import elementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-expect-error
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
//引入自定义插件
import gloalComponent from './components/index'
//icon全局配置
import 'virtual:svg-icons-register'
//初始化页面样式
import '@/styles/index.scss'
//引入路由
import router from '@/router/index'
//引入路由鉴权是否有用户信息
import '@/permisstion'
// 引入大仓库pinia
import pinia from './store'
//echarts监听处理新版浏览器警告
import 'default-passive-events'
//引入按钮鉴权自定义指令
import { isHas } from '@/directive/isHas'
const app = createApp(App)
isHas(app)
//elementui
app.use(elementPlus, { locale: zhCn })
//全局自定义插件
app.use(gloalComponent)
//注册全局路由
app.use(router)
// 注册大仓
app.use(pinia)
//输出生产环境
// console.log(import.meta.env)

app.mount('#app')
